package com.forcht.client.handle.impl;

import com.forcht.client.Client;
import com.forcht.client.handle.ResponseHandler;
import com.forcht.client.view.FriendsListView;
import com.forcht.common.domain.Response;
import org.springframework.stereotype.Component;

/**
 * Created by forcht on 2018/4/15.
 */
@Component("hintHandler.friend_logout")
public class FriendLogoutHintHandler extends ResponseHandler {
    @Override
    public void handle(Response response, Client client) {
        String friendName=new String(response.getBody());
        //更新好友状态
        FriendsListView friendsListView = client.getFriendsListView();
        friendsListView.updateFriendStatus(friendName,false);
    }
}
